UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/IljEHInRweEmAd6BsvUxVBiVxF4jQmXGrLXPxZsmqM=' 
WHERE 
  key_id = '8cac1fed0dda185c1fd9aab1a3919958077679fb03fb2cbd39858e2cb5dd5541' 
  AND (
    token = '/IljEHInRweEmAd6BsvUxVBiVxF4jQmXGrLXPxZsmqM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023