UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'TUf2D0V7Wc0F7ibn0AkYYvy6IbsAkHShzCOtgVFIYE0=' 
WHERE 
  key_id = 'f759c25ec27d1c14c24de5a99983ae96df295790b1afb058bc975a82b30315bb' 
  AND (
    token = 'TUf2D0V7Wc0F7ibn0AkYYvy6IbsAkHShzCOtgVFIYE0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037