UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7kFJ4zzWIOXpcGVzaKBnPN+9zkqIyMm7Qn2V25m50LM=' 
WHERE 
  key_id = '9d78997077fcedde090854604aab531d8cf89411acaf3c1ad7a877ce51473b73' 
  AND (
    token = '7kFJ4zzWIOXpcGVzaKBnPN+9zkqIyMm7Qn2V25m50LM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020