UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ACFtDYO5CEGnXjZY9kbrT+tYPZXgZ83FkLsHtBxCa3E='
WHERE
key_id = '2bc6df2aa8cf97ce075325e83babefb96bf7d9034aea457b5d55c4d8feb00abc'
AND (
token = 'ACFtDYO5CEGnXjZY9kbrT+tYPZXgZ83FkLsHtBxCa3E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)