UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CM91f0eb/3sl15KBmpYrCIKOla2JWTsd1c/7gyxmU+k='
WHERE
key_id = '4d3628390d05d7f549c57d2958841476871a48b2455f40cc73bd74b38f833274'
AND (
token = 'CM91f0eb/3sl15KBmpYrCIKOla2JWTsd1c/7gyxmU+k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)