UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hQPLXQ8SQMho2HsOdQnXnwJOBFaRo60UOcq6Xnb/q7A='
WHERE
key_id = '9eb1ac1e25c9578264f1b6853fee7c2a5805d835496838c889da80c1b1765079'
AND (
token = 'hQPLXQ8SQMho2HsOdQnXnwJOBFaRo60UOcq6Xnb/q7A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)