UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zcPbIEgtM2TXfgibJKuswzDDFKejSYYU6/Bgb6A1DrY=' 
WHERE 
  key_id = '1821db2652b5b4e189de393d814afd3e87ee809b0f1a96e53f1d54bd4eae24d3' 
  AND (
    token = 'zcPbIEgtM2TXfgibJKuswzDDFKejSYYU6/Bgb6A1DrY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029