UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qBUW5YAmje6UkNQUrFrvLNnfkM//AXYh3PQ0vFmO7/Y='
WHERE
key_id = '62b538f9009056b95bc48f7f7a4891d8a10372129fe109043abff2290ff817fa'
AND (
token = 'qBUW5YAmje6UkNQUrFrvLNnfkM//AXYh3PQ0vFmO7/Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)