UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HZRlUf7vClf5AacEl95dVx55DVFWdVBcGFv9d5EagJM='
WHERE
key_id = '700d3aed73474b43826fd7cc31858c5ebd376fd20b01b93e1b94f8456f87d6dd'
AND (
token = 'HZRlUf7vClf5AacEl95dVx55DVFWdVBcGFv9d5EagJM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)