UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'L6aMtou6BQEwrg/QSYrsP+SLJEJbc7FcWdBcW59Ws2Q='
WHERE
key_id = 'df273c27f6ec7cebbacbcda587a74e94f102d0c1a9cc53dc1b4fb07eb9a52fa8'
AND (
token = 'L6aMtou6BQEwrg/QSYrsP+SLJEJbc7FcWdBcW59Ws2Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)