UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FwOMB6g/ywu8i7egLKwp44DgwNGrpI+u8LDH8VK5vvU='
WHERE
key_id = '723880d9337eab2b3f35fdfa72bb7e5557d23dcb7998354ae7b6f124ee2d5458'
AND (
token = 'FwOMB6g/ywu8i7egLKwp44DgwNGrpI+u8LDH8VK5vvU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)