UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XjP73Taby/89LzJOB7+XvGSHjvP83JEppHI8UE/9Bhs='
WHERE
key_id = 'b6088792284065f75c5de9643a84bb30e39e2870cfdb9953c4e8bd01266d2241'
AND (
token = 'XjP73Taby/89LzJOB7+XvGSHjvP83JEppHI8UE/9Bhs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)