UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lv5KcIZFxwdSUGcLY4FGNmfXW4aK7v1g7FWGJxY0Qlo='
WHERE
key_id = '2f36792c287d6c13017fd011f85bb47854f873426f64a3366c6f2c21b3f54e61'
AND (
token = 'lv5KcIZFxwdSUGcLY4FGNmfXW4aK7v1g7FWGJxY0Qlo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)