UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wlMRXFg25dEguRuWl7aJROaQe0HgyFKS7HD7U2S73sk='
WHERE
key_id = '1156bda03527a9b505f47f9dcebb6c5bc683633d5a6f771892cd46e5285319f6'
AND (
token = 'wlMRXFg25dEguRuWl7aJROaQe0HgyFKS7HD7U2S73sk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)