UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ieXLi3dubE/Q3mphe3A/j7A4Uxg/BZtkK+UKuhtiEq0='
WHERE
key_id = 'ef57fbf5a202dee399f1b00d42ff0092caf0fce3e05dfa261083b1b0de868912'
AND (
token = 'ieXLi3dubE/Q3mphe3A/j7A4Uxg/BZtkK+UKuhtiEq0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)