UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QrrlMBJtpXT7w7nR8NzpTIDS8jh5Tl48WacWSdo3Aus='
WHERE
key_id = '3e4ad2aa4b70ff8991df8cabf750080b127870fc37aec9b051ac78e49507b009'
AND (
token = 'QrrlMBJtpXT7w7nR8NzpTIDS8jh5Tl48WacWSdo3Aus='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)