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

Query time 0.00057