UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'm3YpH++XuLgVfbJzFv2W9J+B4BOAEU47CvvRVHMiuDE='
WHERE
key_id = '881ba13c948f2193a428911f57ae376dd6c5124563fe19f7a665ba7e90c80c46'
AND (
token = 'm3YpH++XuLgVfbJzFv2W9J+B4BOAEU47CvvRVHMiuDE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)