UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jI/NgOHM8ixMHaaPULIMqcHXghhTFhfwimg5KiTht2c='
WHERE
key_id = 'e5c4f3b18bc7ccdd52716741e8cb6b7ee140c62ab0321571a3a772dce06ac24a'
AND (
token = 'jI/NgOHM8ixMHaaPULIMqcHXghhTFhfwimg5KiTht2c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)