UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'IHat95WNp3f1Ihb9gUYnajX42O7wG2o31OTyXMDzloY=' 
WHERE 
  key_id = '75cc9956e9c3b0d09d38570fae9e6b17d775a61558c61a3383a8e45bdf66940c' 
  AND (
    token = 'IHat95WNp3f1Ihb9gUYnajX42O7wG2o31OTyXMDzloY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035