UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DQM6JU2zMdWHm6O9Qro+JocYUgdYYG9fr4A96SuMAjk='
WHERE
key_id = '44cd67eb0010e0493348f1e7e603c6feea2606d0c0280e22a2711703f8d01a77'
AND (
token = 'DQM6JU2zMdWHm6O9Qro+JocYUgdYYG9fr4A96SuMAjk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)