UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Qym3KDkRFiKzDemH3ZB35bSle8iiGhguFDUDo81b2dk=' 
WHERE 
  key_id = '8757ff31716fbf14f9fc06e0ea50cfb43fd89413c90eff0a861ea215c4c83d3e' 
  AND (
    token = 'Qym3KDkRFiKzDemH3ZB35bSle8iiGhguFDUDo81b2dk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041