UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/6Z6zgcw5g1clTlbRw6KSZJaQKD2H7Fzxk9vSZtewWY=' 
WHERE 
  key_id = '7d236843720e21e0a18063ac2bafa02ff4a22af128c63943bc3a7fe06424aaea' 
  AND (
    token = '/6Z6zgcw5g1clTlbRw6KSZJaQKD2H7Fzxk9vSZtewWY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035