UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rQ3pzpIu85Mh1Wa1zSnyErNAR81EYOGw3jO+EsGz6fU='
WHERE
key_id = '6df088a88ac9e363efdefc802ddc1d3e6b8f1191548a6eab4f1b1e2b59007c2f'
AND (
token = 'rQ3pzpIu85Mh1Wa1zSnyErNAR81EYOGw3jO+EsGz6fU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)