UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'H6/LTjJTfO99OC1QhrskyIVi6lq8gBvt/ubfvGBFblg='
WHERE
key_id = 'eeb8ca8ef49be2130528bc86f4e36c145b9ced5844bde7c6db292a39bcb814ff'
AND (
token = 'H6/LTjJTfO99OC1QhrskyIVi6lq8gBvt/ubfvGBFblg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)