UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/vBdeB/45SeOt0pTDgHE70SoHdGsifZ2SAAhRxihaQg=' 
WHERE 
  key_id = 'a2a0273ef10770cfd0dc93f7a9f49138c94438a96e93aa149d88a7578ddb419f' 
  AND (
    token = '/vBdeB/45SeOt0pTDgHE70SoHdGsifZ2SAAhRxihaQg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040