UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'BJRdyqaONnlXjInEyDGycCMV5nh6ZFpEob5n7bqsDAU='
WHERE
key_id = '71caa9f9097ce0414c21fa6b41d090bfe1f82fd8a948ef059ecdef23c67b92eb'
AND (
token = 'BJRdyqaONnlXjInEyDGycCMV5nh6ZFpEob5n7bqsDAU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)