UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Mk/FAJq9+e3FFWkjmGMVO93WQvCjc99N6D9jqfXBYPU='
WHERE
key_id = '2e1eb683318a4ab54dd6ed60c51842debd5f4c68c60cb55ef2f9979d8f9d1185'
AND (
token = 'Mk/FAJq9+e3FFWkjmGMVO93WQvCjc99N6D9jqfXBYPU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)