UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MbuK3L3YpwRg+E/nCyn/MukmIXE9UUb3iy3Wk1CvcYE='
WHERE
key_id = '97f53e72cbbefd6db077b15962b9ca2fbfa907c86e3954648c7247af0ddf282d'
AND (
token = 'MbuK3L3YpwRg+E/nCyn/MukmIXE9UUb3iy3Wk1CvcYE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)