UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '60FaMR6Q47lCRaYG4gxtMi6nr3hyBL6HXzIUhH/w1g0=' 
WHERE 
  key_id = '07c911d295baf797625c06a62ca65e17614d4769f207d8656945762f7a3bad61' 
  AND (
    token = '60FaMR6Q47lCRaYG4gxtMi6nr3hyBL6HXzIUhH/w1g0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037