UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5djE86L3ELhRhU4UgnMugxhvEJsd3CblQcIqFWOuW9A='
WHERE
key_id = 'f3612ac61546b9bded0cc397a7a916e92f0a49fe5cfe55057915196d269714b6'
AND (
token = '5djE86L3ELhRhU4UgnMugxhvEJsd3CblQcIqFWOuW9A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)