UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RERzlDgyVo4dGVvNQqxLKDZbXO1E+zBlIr7g+rQqi5E='
WHERE
key_id = '4d2bb73dd3686ef7c23babb2f694d0728c9251187190614a1ce3289ab6ca421a'
AND (
token = 'RERzlDgyVo4dGVvNQqxLKDZbXO1E+zBlIr7g+rQqi5E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)