UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'dSOB4j593WQ6+rq7F3P346x47If6TL9+DUwp21vefHk='
WHERE
key_id = 'c8b4e9f4298425627f0055c98300e2f92f84d82684ef6e7d1396e5abdc97c5ff'
AND (
token = 'dSOB4j593WQ6+rq7F3P346x47If6TL9+DUwp21vefHk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)