UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cV+b+EKDMLCm68ibmm0chZct7np7KR3ERbkcSDM9wd8='
WHERE
key_id = '86c673e9d2966fd0f3b22b1f0a26e03378535ecbd72582d349ad4fc0b76d85c8'
AND (
token = 'cV+b+EKDMLCm68ibmm0chZct7np7KR3ERbkcSDM9wd8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)