UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'F7qD3mNyWuEJr1C3LOXlWv7U+qMhf25IWCJ1/steIiM='
WHERE
key_id = '8d608cfe297fae4718c0ea930446ea6687d888c70d6bc02004bd536c50056ad9'
AND (
token = 'F7qD3mNyWuEJr1C3LOXlWv7U+qMhf25IWCJ1/steIiM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)