UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'v8/uSqP7mtiR/uo+o8Yq5ZDdcuftJ8BBZKj+t1+d1sY='
WHERE
key_id = '4ec0d7fb1d5aa4e341b7757fb106b8142d297f45b5ccdcafc3f5eb7abba7e543'
AND (
token = 'v8/uSqP7mtiR/uo+o8Yq5ZDdcuftJ8BBZKj+t1+d1sY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)