UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '71luuG2aJ0FjWPzVH6klbLzgR5IzqC3kRfY16tKAeBA='
WHERE
key_id = 'e953ef2ad2647c91a59a8bd2ad55ad1245552e7b873131b6cf1429054a525407'
AND (
token = '71luuG2aJ0FjWPzVH6klbLzgR5IzqC3kRfY16tKAeBA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)