UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fR7sSa/V67JQCHsAhqniw+Lg5buYezDo1tlTpzKD1Z4='
WHERE
key_id = '4ab0763ee217fe94f429382e231c33ee1fd467233bc881b752159ced20174fec'
AND (
token = 'fR7sSa/V67JQCHsAhqniw+Lg5buYezDo1tlTpzKD1Z4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)